package refactor.formtemplatemethod;

public class TextStatement extends Statement {

    @Override
    protected String footerString(Customer customer) {
        String result = "";
        //add footer lines
        result += "Amount owed is " + customer.calcTotalAmount() + "\n";
        result += "You earned " + customer.calcFrequentRenterPoints() +
                " frequent renter points";
        return result;
    }

    @Override
    protected String eachRentalString(Rental rental) {
        return "\t" + rental.getMovie().getTitle() + "\t" +
                rental.getCharge() + "\n";
    }

    @Override
    protected String headerString(Customer customer) {
        String result = "Rental Record for " + customer.getName() + "\n";
        return result;
    }
}